package
{
	import flash.events.EventDispatcher;
	
	import mx.events.FlexEvent;

	public class PresenceState extends EventDispatcher
	{
		public var id: String;

		[Bindable]
		public var name: String;

		private var ms_state: String;
		
		public function PresenceState(s_id: String, s_name: String, s_state: String)
		{
			this.id = s_id;
			this.name = s_name;
			this.ms_state = s_state;
		}
		
		[Bindable]
		public function set state(s_state: String): void
		{
			if(ms_state != s_state) {
				ms_state = s_state;
				dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE));
			}
		}

		public function get state(): String
		{
			return ms_state;
		}
	}
}